/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2006                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     pimpleFoam;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         END_TIME;

deltaT          4e-3;

writeControl    timeStep;

writeInterval   50;

purgeWrite      3;

writeFormat     ascii;

writePrecision  8;

writeCompression off;

timeFormat      general;

timePrecision   8;

runTimeModifiable false;

adjustTimeStep  false;


// Allow 10% of time for initialisation before sampling
timeStart       #eval #{ 0.1 * ${/endTime} #};

functions
{
    fieldAverage1
    {
        type                fieldAverage;
        libs                (fieldFunctionObjects);
        writeControl        writeTime;
        timeStart           $/timeStart;

        fields
        (
            U
            {
                mean        on;
                prime2Mean  on;
                base        time;
            }
        );
    }

    sampling1
    {
        type                sets;
        libs                (sampling);
        interpolationScheme cellPoint;
        setFormat           raw;
        writeControl        onEnd;
        fields              (UPrime2Mean UMean);

        sets
        (
            inletPatch
            {
                type        face;
                axis        y;
                start       (0.0 0 1.57);
                end         (0.0 2 1.57);
            }

            inletCell
            {
                type        midPoint;
                axis        y;
                start       (0.062832 0 1.57);
                end         (0.062832 2 1.57);
            }
        );
    }
}


// ************************************************************************* //
